<script type="text/javascript" language="javascript">
(function($) {
/*whatever jQuery stuff*/
	$(function(){
		var is_mobile = '<?php echo $this->agent->is_mobile();?>';
		if(is_mobile){
			//Set Video Source
			var url = "<?php echo $award_url.'getMedia/'.$this->encrypt->encode(''.image_asset_url($asset_award_upload_path.'home.mp4').'',$this->config->item('encryption_key')).'.mp4';?>";
			$('#my_video').append("<source id='mp4' src='"+url+"' type='video/mp4'>");
			$('#my_video').attr('src',""+url+"");
			$('#my_video').attr('width',640);
			$('#my_video').attr('height',390);
			// videoplaza sdk, 4 sec time-out, callback function
			loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
			// *** START - videoplaza plugin config ***
			vpConfig = {
				vphost : 'http://th-pmdplus.videoplaza.tv',
				category : 'award',
				tags : ['standard'],
				flags: [],
				playbackPosition: [] // mid-roll cue points, if any.
			}
			// *** END - videoplaza plugin config ***	
			//Auto Play && Loop
			$('#my_video').attr('autoplay','autoplay');				
		} else {	
			jwplayer("vdoPlayer").setup({
				autostart: true,
		      	flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
		      	width: 640,
		      	height: 390,
				file: "<?php echo $award_url.'getMedia/'.$this->encrypt->encode(''.image_asset_url($asset_award_upload_path.'home.mp4').'',$this->config->item('encryption_key')).'.mp4';?>",
		      	plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
		      	vpdomain: "http://th-pmdplus.videoplaza.tv",
		      	vpshares: "award",
		      	vptags: ""
			});		
		}
	});	
})(jQuery);

function voteCat(e,cat,at)
{
	var expireShowPercent = '<?php echo $this->expireShowPercent;?>';
	var todayTime = '<?php echo time();?>';
	$.ajax({
		url:web_path+'award/ajax_vote?t='+new Date().getTime(),
		type:'post',
		data:({
			cat:cat,
			at:at
		}),
		dataType:'json'
	}).done(function(data){
		if(data.error == 1){
			alert('กรุณา Login ด้วย Facebook ก่อนทำการโหวต.');
			//$(document).scrollTop(0);
			$('html, body').animate({
    			scrollTop: 0
 			}, 1000);
		} else if(data.error == 2){
			alert('คุณมีสิทธิ์ในการโหวต 1 ชั่วโมงต่อ 1 หมวดรางวัล\nคุณสามารถกลับมาโหวตในหมวดนี้อีกครั้งหลัง 1 ชั่วโมง.');
		} else if(data.error == 3){
			alert('ขออภัยค่ะ ปิดกิจกรรมการโหวตเรียบร้อยแล้ว');			
		} else {
			if(expireShowPercent < todayTime){
				$(e).closest('.blockClear').find('.voteScore').each(function(i,key){
					$(this).html(data[i]+'%');
				});				
			}
			
			//change image to voted
			$(e).attr('class','buttonVoted');
			$(e).closest('.blockClear').find('.buttonVote').css({visibility:'hidden'});
		}
	});
}
</script>
<!--Vdo Player-->
<div id="voteVdoPlayer">
	<div id="vdoPlayer">
		<?php if($this->agent->is_mobile()):?>
			<video id='my_video' controls preload='none'></video>
		<?php endif;?>
	</div>
</div>
<div class="wrap_content">
	<div id="frameVoteTop"></div>
	<div id="frameVoteContent">
		<a name="cat01"></a>
		<h2 class="voteCat cat01 blue"><?php echo $dataCategory['01'];?></h2>
		<div class="blockClear">
			<?php $cat01_total = $dataVote->cat01_1+$dataVote->cat01_2+$dataVote->cat01_3+$dataVote->cat01_4+$dataVote->cat01_5+$dataVote->cat01_6;?>
			<?php $cat01_winner = max($dataVote->cat01_1,$dataVote->cat01_2,$dataVote->cat01_3,$dataVote->cat01_4,$dataVote->cat01_5,$dataVote->cat01_6);?>
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/01/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/01/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML01'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML01'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat01_winner == $dataVote->{'cat01_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat01 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat01) && @$cat01 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'01','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat01_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat01_'.$i}*100)/$cat01_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat02"></a>
		<h2 class="voteCat cat02 pink"><?php echo $dataCategory['02'];?></h2>
		<div class="blockClear">
			<?php $cat02_total = $dataVote->cat02_1+$dataVote->cat02_2+$dataVote->cat02_3+$dataVote->cat02_4+$dataVote->cat02_5+$dataVote->cat02_6;?>
			<?php $cat02_winner = max($dataVote->cat02_1,$dataVote->cat02_2,$dataVote->cat02_3,$dataVote->cat02_4,$dataVote->cat02_5,$dataVote->cat02_6);?>
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/02/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/02/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML02'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML02'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat02_winner == $dataVote->{'cat02_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat02 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat02) && @$cat02 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'02','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat02_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat02_'.$i}*100)/$cat02_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat03"></a>		
		<h2 class="voteCat cat03 purple"><?php echo $dataCategory['03'];?></h2>
		<div class="blockClear">
			<?php $cat03_total = $dataVote->cat03_1+$dataVote->cat03_2+$dataVote->cat03_3+$dataVote->cat03_4+$dataVote->cat03_5+$dataVote->cat03_6;?>
			<?php $cat03_winner = max($dataVote->cat03_1,$dataVote->cat03_2,$dataVote->cat03_3,$dataVote->cat03_4,$dataVote->cat03_5,$dataVote->cat03_6);?>			
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/03/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/03/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML03'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML03'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat03_winner == $dataVote->{'cat03_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat03 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat03) && @$cat03 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'03','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat03_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat03_'.$i}*100)/$cat03_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat04"></a>	
		<h2 class="voteCat cat04 orange"><?php echo $dataCategory['04'];?></h2>
		<div class="blockClear">
			<?php $cat04_total = $dataVote->cat04_1+$dataVote->cat04_2+$dataVote->cat04_3+$dataVote->cat04_4+$dataVote->cat04_5+$dataVote->cat04_6;?>
			<?php $cat04_winner = max($dataVote->cat04_1,$dataVote->cat04_2,$dataVote->cat04_3,$dataVote->cat04_4,$dataVote->cat04_5,$dataVote->cat04_6);?>				
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/04/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/04/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML04'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML04'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat04_winner == $dataVote->{'cat04_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat04 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat04) && @$cat04 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'04','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat04_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat04_'.$i}*100)/$cat04_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat05"></a>	
		<h2 class="voteCat cat05 green"><?php echo $dataCategory['05'];?></h2>
		<div class="blockClear">
			<?php $cat05_total = $dataVote->cat05_1+$dataVote->cat05_2+$dataVote->cat05_3+$dataVote->cat05_4+$dataVote->cat05_5+$dataVote->cat05_6;?>
			<?php $cat05_winner = max($dataVote->cat05_1,$dataVote->cat05_2,$dataVote->cat05_3,$dataVote->cat05_4,$dataVote->cat05_5,$dataVote->cat05_6);?>				
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/05/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/05/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML05'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML05'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat05_winner == $dataVote->{'cat05_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat05 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat05) && @$cat05 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'05','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat05_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat05_'.$i}*100)/$cat05_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat06"></a>
		<h2 class="voteCat cat06 blue"><?php echo $dataCategory['06'];?></h2>
		<div class="blockClear">
			<?php $cat06_total = $dataVote->cat06_1+$dataVote->cat06_2+$dataVote->cat06_3+$dataVote->cat06_4+$dataVote->cat06_5+$dataVote->cat06_6;?>
			<?php $cat06_winner = max($dataVote->cat06_1,$dataVote->cat06_2,$dataVote->cat06_3,$dataVote->cat06_4,$dataVote->cat06_5,$dataVote->cat06_6);?>				
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/06/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/06/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML06'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML06'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat06_winner == $dataVote->{'cat06_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat06 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat06) && @$cat06 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'06','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat06_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat06_'.$i}*100)/$cat06_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat07"></a>	
		<h2 class="voteCat cat07 pink"><?php echo $dataCategory['07'];?></h2>
		<div class="blockClear">
			<?php $cat07_total = $dataVote->cat07_1+$dataVote->cat07_2+$dataVote->cat07_3+$dataVote->cat07_4+$dataVote->cat07_5+$dataVote->cat07_6;?>
			<?php $cat07_winner = max($dataVote->cat07_1,$dataVote->cat07_2,$dataVote->cat07_3,$dataVote->cat07_4,$dataVote->cat07_5,$dataVote->cat07_6);?>				
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/07/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/07/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML07'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML07'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat07_winner == $dataVote->{'cat07_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat07 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat07) && @$cat07 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'07','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat07_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat07_'.$i}*100)/$cat07_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat08"></a>	
		<h2 class="voteCat cat08 purple"><?php echo $dataCategory['08'];?></h2>
		<div class="blockClear">
			<?php $cat08_total = $dataVote->cat08_1+$dataVote->cat08_2+$dataVote->cat08_3+$dataVote->cat08_4+$dataVote->cat08_5+$dataVote->cat08_6;?>
			<?php $cat08_winner = max($dataVote->cat08_1,$dataVote->cat08_2,$dataVote->cat08_3,$dataVote->cat08_4,$dataVote->cat08_5,$dataVote->cat08_6);?>			
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/08/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/08/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML08'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML08'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat08_winner == $dataVote->{'cat08_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat08 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat08) && @$cat08 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'08','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat08_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat08_'.$i}*100)/$cat08_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat09"></a>	
		<h2 class="voteCat cat09 orange"><?php echo $dataCategory['09'];?></h2>
		<div class="blockClear">
			<?php $cat09_total = $dataVote->cat09_1+$dataVote->cat09_2+$dataVote->cat09_3+$dataVote->cat09_4+$dataVote->cat09_5+$dataVote->cat09_6;?>
			<?php $cat09_winner = max($dataVote->cat09_1,$dataVote->cat09_2,$dataVote->cat09_3,$dataVote->cat09_4,$dataVote->cat09_5,$dataVote->cat09_6);?>				
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/09/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/09/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML09'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML09'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat09_winner == $dataVote->{'cat09_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat09 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat09) && @$cat09 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'09','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat09_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat09_'.$i}*100)/$cat09_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>
		<a name="cat10"></a>	
		<h2 class="voteCat cat10 green"><?php echo $dataCategory['10'];?></h2>
		<div class="blockClear">
			<?php $cat10_total = $dataVote->cat10_1+$dataVote->cat10_2+$dataVote->cat10_3+$dataVote->cat10_4+$dataVote->cat10_5+$dataVote->cat10_6;?>
			<?php $cat10_winner = max($dataVote->cat10_1,$dataVote->cat10_2,$dataVote->cat10_3,$dataVote->cat10_4,$dataVote->cat10_5,$dataVote->cat10_6);?>			
			<?php for($i=1;$i<=6;$i++):?>
			<div class="blockVote blueBG <?php echo ($i == 1 ? 'first':'');?>">
				<a href="<?php echo $award_url."artist/10/".$i;?>">
					<div class="voteImage"><?php echo image_asset($asset_award_upload_path.'artist/10/'.$i.'/vote_thumb.jpg','',array('width' => 142,'height' => 142));?></div>
					<h3><?php echo ${'dataXML10'.$i}->vote_artist_name;?></h3>
					<p><?php echo ${'dataXML10'.$i}->vote_description;?></p>
				</a>
				<?php if($this->expireActivity < time()):?>
					<?php if($this->showWinner < time()):?>
						<?php if($cat10_winner == $dataVote->{'cat10_'.$i}):?>
							<a class="buttonWinner"></a>
						<?php endif;?>						
					<?php else:?>
						<a class="buttonClosed">ปิดโหวต</a>
					<?php endif;?>
				<?php else:?>
					<a <?php echo (@$cat10 == $i ? 'class="buttonVoted"':'class="buttonVote"');?> <?php echo (isset($cat10) && @$cat10 != $i ? 'style="visibility:hidden;"':'');?> href="javascript:void(0);" onclick="javascript:voteCat(this,'10','<?php echo $i;?>');"></a>				
				<?php endif;?>
				<?php if($this->expireShowPercent > time() || $this->showWinner < time()):?>
				<div class="voteScore"><?php echo ($cat10_total == 0 ? '0.00':sprintf("%.2f",($dataVote->{'cat10_'.$i}*100)/$cat10_total));?>%</div>
				<?php endif;?>
			</div>
			<?php endfor;?>
		</div>		
	</div>
	<div id="frameVoteBottom"></div>
	<!--Sponser2-->
	<?php echo CI('module_sponser2');?>
</div>